# coding: utf-8

Pod::Spec.new do |s|

  s.name         = "WeexSDK"

  s.version      = "0.28.0"

  s.summary      = "WeexSDK Source."

  s.description  = <<-DESC
                   A framework for building Mobile cross-platform UI
                   DESC

  s.homepage     = "https://github.com/apache/incubator-weex"
  s.license = {
    :type => 'Apache-2.0'
  }
  s.authors      = {
                    "dev" => "dev@weex.apache.org"
                   }
  s.platform     = :ios
  s.ios.deployment_target = '9.0'

  # use for public
  s.source =  {
   :git => 'https://gitee.com/609974309/SEHome.git',
  }

  # use for playground
  # s.source =  { :path => '.' }

  # s.source_files = 'WeexSDK/Sources/**/*.{h,m,mm,c,cpp,cc}',
  #                   'WeexCore/Source/base/**/*.{h,hpp,m,mm,c,cpp,cc}',
  #                   'WeexCore/Source/core/**/*.{h,hpp,m,mm,c,cpp,cc}',
  #                   'WeexCore/Source/wson/**/*.{h,hpp,m,mm,c,cpp,cc}',
  #                   'WeexCore/Source/third_party/**/*.{h,hpp,m,mm,c,cpp,cc}',
  #                   'WeexCore/Source/include/**/*.{h,hpp,m,mm,c,cpp,cc}',
  #                   "XYLib/Source/*.{h,m}"

  s.source_files = 'WeexSDK/Sources/Bridge/*.{h,m,mm,c,cpp,cc}',
  'WeexSDK/Sources/Component/*.{h,m,mm,c,cpp,cc}',
  'WeexSDK/Sources/Controller/*.{h,m,mm,c,cpp,cc}',
  'WeexSDK/Sources/Debug/*.{h,m,mm,c,cpp,cc}',
  'WeexSDK/Sources/Display/*.{h,m,mm,c,cpp,cc}',
  'WeexSDK/Sources/Engine/*.{h,m,mm,c,cpp,cc}',
  'WeexSDK/Sources/Events/*.{h,m,mm,c,cpp,cc}',
  'WeexSDK/Sources/Handler/*.{h,m,mm,c,cpp,cc}',
  'WeexSDK/Sources/Layout/*.{h,m,mm,c,cpp,cc}',
  'WeexSDK/Sources/Loader/*.{h,m,mm,c,cpp,cc}',
  'WeexSDK/Sources/Manager/*.{h,m,mm,c,cpp,cc}',
  'WeexSDK/Sources/Model/*.{h,m,mm,c,cpp,cc}',
  'WeexSDK/Sources/Module/*.{h,m,mm,c,cpp,cc}',
  'WeexSDK/Sources/Monitor/*.{h,m,mm,c,cpp,cc}',
  'WeexSDK/Sources/Module/*.{h,m,mm,c,cpp,cc}',
  'WeexSDK/Sources/Network/*.{h,m,mm,c,cpp,cc}',
  'WeexSDK/Sources/Performance/*.{h,m,mm,c,cpp,cc}',
  'WeexSDK/Sources/Plugin/*.{h,m,mm,c,cpp,cc}',
  'WeexSDK/Sources/Protocol/*.{h,m,mm,c,cpp,cc}',
  'WeexSDK/Sources/Utility/*.{h,m,mm,c,cpp,cc}',
  'WeexSDK/Sources/View/*.{h,m,mm,c,cpp,cc}',
  'WeexSDK/Sources/WebSocket/*.{h,m,mm,c,cpp,cc}',
  'WeexSDK/Sources/*.{h,m,mm,c,cpp,cc}',


                    'WeexCore/Source/base/**/*.{h,hpp,m,mm,c,cpp,cc}',
                    'WeexCore/Source/core/**/*.{h,hpp,m,mm,c,cpp,cc}',
                    'WeexCore/Source/wson/**/*.{h,hpp,m,mm,c,cpp,cc}',
                    'WeexCore/Source/third_party/**/*.{h,hpp,m,mm,c,cpp,cc}',
                    'WeexCore/Source/include/**/*.{h,hpp,m,mm,c,cpp,cc}',


  s.exclude_files = 'WeexCore/Source/**/*android.{h,hpp,m,mm,c,cpp,cc}',
                    'WeexCore/Source/base/android',
                    'WeexCore/Source/base/base64',
                    'WeexCore/Source/base/crash',
                    'WeexCore/Source/base/utils/Compatible.cpp',
                    'WeexCore/Source/base/utils/ThreadLocker.cpp',
                    'WeexCore/Source/core/parser/action_args_check.*',
                    'WeexCore/Source/third_party/IPC',
                    'WeexCore/Source/core/network/android/',
                    'WeexCore/Source/include/JavaScriptCore/',
                    'WeexCore/Source/include/wtf'

  s.private_header_files = 'WeexSDK/Sources/Component/RecycleList/WXJSASTParser.h'
  s.public_header_files = 'WeexSDK/Sources/WeexSDK.h',
                          'WeexSDK/Sources/Layout/WXComponent+Layout.h',
                          'WeexSDK/Sources/Debug/WXDebugTool.h',
                          'WeexSDK/Sources/Loader/WXResourceLoader.h',
                          'WeexSDK/Sources/WebSocket/WXWebSocketHandler.h',
                          'WeexSDK/Sources/Module/WXVoiceOverModule.h',
                          'WeexSDK/Sources/Module/WXPrerenderManager.h',
                          'WeexSDK/Sources/Module/WXModalUIModule.h',
                          'WeexSDK/Sources/Module/WXStreamModule.h',
                          'WeexSDK/Sources/Module/WXStorageModule.h',
                          'WeexSDK/Sources/Component/WXListComponent.h',
                          'WeexSDK/Sources/Component/WXScrollerComponent.h',
                          'WeexSDK/Sources/Component/WXRichText.h',
                          'WeexSDK/Sources/Component/WXIndicatorComponent.h',
                          'WeexSDK/Sources/Component/WXAComponent.h',
                          'WeexSDK/Sources/Component/WXRefreshComponent.h',
                          'WeexSDK/Sources/Component/Recycler/WXRecyclerComponent.h',
                          'WeexSDK/Sources/Controller/WXBaseViewController.h',
                          'WeexSDK/Sources/Controller/WXRootViewController.h',
                          'WeexSDK/Sources/Handler/WXNavigationDefaultImpl.h',
                          'WeexSDK/Sources/View/WXView.h',
                          'WeexSDK/Sources/View/WXErrorView.h',
                          'WeexSDK/Sources/Protocol/*.h',
                          'WeexSDK/Sources/Plugin/WXEaglePluginManager.h',
                          'WeexSDK/Sources/Plugin/WXEaglePlugin.h',
                          'WeexSDK/Sources/Network/WXResourceRequestHandler.h',
                          'WeexSDK/Sources/Network/WXResourceRequest.h',
                          'WeexSDK/Sources/Network/WXResourceResponse.h',
                          'WeexSDK/Sources/Model/WXSDKInstance.h',
                          'WeexSDK/Sources/Model/WXJSExceptionInfo.h',
                          'WeexSDK/Sources/Model/WXComponent.h',
                          'WeexSDK/Sources/Monitor/WXMonitor.h',
                          'WeexSDK/Sources/Monitor/WXExceptionUtils.h',
                          'WeexSDK/Sources/Monitor/WXAnalyzerCenter.h',
                          'WeexSDK/Sources/Manager/WXSDKManager.h',
                          'WeexSDK/Sources/Manager/WXBridgeManager.h',
                          'WeexSDK/Sources/Manager/WXComponentManager.h',
                          'WeexSDK/Sources/Manager/WXHandlerFactory.h',
                          'WeexSDK/Sources/Manager/WXComponentFactory.h',
                          'WeexSDK/Sources/Manager/WXInvocationConfig.h',
                          'WeexSDK/Sources/Manager/WXModuleFactory.h',
                          'WeexSDK/Sources/Engine/WXSDKEngine.h',
                          'WeexSDK/Sources/Engine/WXSDKError.h',
                          'WeexSDK/Sources/Events/*.h',
                          'WeexSDK/Sources/Eagle/WXDataRenderHandler.h',
                          'WeexSDK/Sources/Utility/WXConvert.h',
                          'WeexSDK/Sources/Utility/WXUtility.h',
                          'WeexSDK/Sources/Utility/WXConvertUtility.h',
                          'WeexSDK/Sources/Utility/WXLog.h',
                          'WeexSDK/Sources/Utility/WXDefine.h',
                          'WeexSDK/Sources/Utility/WXType.h',
                          'WeexSDK/Sources/Utility/NSObject+WXSwizzle.h',
                          'WeexSDK/Sources/Utility/WXAppConfiguration.h',
                          'WeexSDK/Sources/Performance/WXApmForInstance.h',
                          'WeexSDK/Sources/Bridge/JSContext+Weex.h',
                          'WeexSDK/Sources/Bridge/WXBridgeMethod.h',
                          'WeexCore/Source/core/layout/flex_enum.h',
                          'WeexCore/Source/core/layout/layout.h',
                          'WeexCore/Source/core/layout/style.h',
                          'WeexCore/Source/core/bridge/eagle_bridge.h',
                          'WeexCore/Source/core/render/page/reactor_page.h',
                          "XYLib/Source/**/*.{h}",

  s.module_map = 'WeexSDK.modulemap'

  # 0.21.0 版本开始不再需要 native-bundle-main.js
  s.resources = 'WeexSDK/Resources/*.js','WeexSDK/Resources/wx_load_error@3x.png'

  s.user_target_xcconfig  = { 'FRAMEWORK_SEARCH_PATHS' => "'$(PODS_ROOT)/WeexSDK'" }
  s.requires_arc = true
  s.prefix_header_file = 'WeexSDK/Sources/Supporting Files/WeexSDK-Prefix.pch'

  s.xcconfig = { "OTHER_LINK_FLAG" => '$(inherited) -ObjC' }
  s.pod_target_xcconfig = { 'USER_HEADER_SEARCH_PATHS' => '${PODS_TARGET_SRCROOT}/WeexCore/Source/ ${PROJECT_DIR}/WeexSDK/WeexCore/Source',
    'GCC_PREPROCESSOR_DEFINITIONS' => 'OS_IOS=1' }

  s.frameworks = 'CoreMedia','MediaPlayer','AVFoundation','AVKit','JavaScriptCore','GLKit','OpenGLES','CoreText','QuartzCore','CoreGraphics'

  s.libraries = 'c++'

  # s.subspec 'WeexSDK' do |xy|
  #   xy.subspec 'Sources' do |ss|
  #     ss.source_files  = "WeexSDK/Sources/**/*.{h,m,mm,c,cpp,cc}"
  #   end
  # end


  s.subspec 'XYLib' do |xy|
    xy.subspec 'Extension' do |ss|
      ss.source_files  = "XYLib/Source/Extension/*.{c,h,m}"
      ss.public_header_files = "XYLib/Source/Extension/*.h"
      ss.requires_arc  = true
    end
    xy.subspec 'Extension' do |ss|
      ss.source_files  = "XYLib/Source/Extension/*.{c,h,m}"
      ss.public_header_files = "XYLib/Source/Extension/*.h"
      ss.requires_arc  = true
    end
  
    xy.subspec 'HotUpdate' do |ss|
      ss.source_files  = "XYLib/Source/HotUpdate/*.{c,h,m}"
      ss.public_header_files = "XYLib/Source/HotUpdate/*.h"
      ss.requires_arc  = true
    end
  
    xy.subspec 'Handler' do |ss|
      ss.source_files  = "XYLib/Source/Handler/**/*.{c,h,m}"
      ss.public_header_files = "XYLib/Source/Handler/**/*.h"
      ss.requires_arc  = true
    end
  
    xy.subspec 'Delegate' do |ss|
      ss.source_files  = "XYLib/Source/Delegate/**/*.{c,h,m}"
      ss.public_header_files = "XYLib/Source/Delegate/**/*.h"
      ss.requires_arc  = true
    end
  
    xy.subspec 'Controller' do |ss|
      ss.source_files  = "XYLib/Source/Controller/*.{c,h,m}"
      ss.public_header_files = "XYLib/Source/Controller/*.h"
      ss.requires_arc  = true
    end
  
    xy.subspec 'MediaPlayer' do |ss|
      ss.source_files  = "XYLib/Source/Component/MediaPlayer/**/*.{c,h,m}"
      ss.public_header_files = "XYLib/Source/Component/MediaPlayer/**/*.h"
      ss.requires_arc  = true
    end
  
    xy.subspec 'Camera' do |ss|
      ss.source_files  = "XYLib/Source/Component/Camera/*.{c,h,m}"
      ss.public_header_files = "XYLib/Source/Component/Camera/*.h"
      ss.requires_arc  = true
    end
  
    xy.subspec 'RichTextInput' do |ss|
      ss.source_files  = "XYLib/Source/Component/RichTextInput/*.{c,h,m}"
      ss.public_header_files = "XYLib/Source/Component/RichTextInput/*.h"
      ss.requires_arc  = true
    end
  
    xy.subspec 'KLine' do |ss|
      ss.source_files  = "XYLib/Source/Component/KLine/**/*.{c,h,m}"
      ss.public_header_files = "XYLib/Source/Component/KLine/**/*.h"
      ss.requires_arc  = true
    end
  
    xy.subspec 'PreviewImage' do |ss|
      ss.source_files  = "XYLib/Source/Component/PreviewImage/*.{c,h,m}"
      ss.public_header_files = "XYLib/Source/Component/PreviewImage/*.h"
      ss.requires_arc  = true
    end
  
    xy.subspec 'Select' do |ss|
      ss.source_files  = "XYLib/Source/Component/Select/*.{c,h,m}"
      ss.public_header_files = "XYLib/Source/Component/Select/*.h"
      ss.requires_arc  = true
    end
  
    xy.subspec 'CookieStorage' do |ss|
      ss.source_files  = "XYLib/Source/Module/CookieStorage/*.{c,h,m}"
      ss.public_header_files = "XYLib/Source/Module/CookieStorage/*.h"
      ss.requires_arc  = true
    end
  
    xy.subspec 'Download' do |ss|
      ss.source_files  = "XYLib/Source/Module/Download/*.{c,h,m}"
      ss.public_header_files = "XYLib/Source/Module/Download/*.h"
      ss.requires_arc  = true
    end
  
    xy.subspec 'Transfer' do |ss|
      ss.source_files  = "XYLib/Source/Module/Transfer/*.{c,h,m}"
      ss.public_header_files = "XYLib/Source/Module/Transfer/*.h"
      ss.requires_arc  = true
    end
  
    xy.subspec 'ImagePicker' do |ss|
      ss.source_files  = "XYLib/Source/Module/ImagePicker/*.{c,h,m}"
      ss.public_header_files = "XYLib/Source/Module/ImagePicker/*.h"
      ss.requires_arc  = true
    end
  
    xy.subspec 'StatusBar' do |ss|
      ss.source_files  = "XYLib/Source/Module/StatusBar/*.{c,h,m}"
      ss.public_header_files = "XYLib/Source/Module/StatusBar/*.h"
      ss.requires_arc  = true
    end
  
    xy.subspec 'Encryption' do |ss|
      ss.source_files  = "XYLib/Source/Module/Encryption/*.{c,h,m}"
      ss.public_header_files = "XYLib/Source/Module/Encryption/*.h"
      ss.requires_arc  = true
    end
  
    xy.subspec 'QRCode' do |ss|
      ss.source_files  = "XYLib/Source/Module/QRCode/**/*.{c,h,m}"
      ss.public_header_files = "XYLib/Source/Module/QRCode/**/*.h"
      ss.requires_arc  = true
    end
  
    xy.subspec 'JPush' do |ss|
      ss.source_files  = "XYLib/Source/Module/JPush/*.{c,h,m}"
      ss.public_header_files = "XYLib/Source/Module/JPush/*.h"
      ss.requires_arc  = true
    end
  
    xy.subspec 'SplashScreen' do |ss|
      ss.source_files  = "XYLib/Source/Module/SplashScreen/*.{c,h,m}"
      ss.public_header_files = "XYLib/Source/Module/SplashScreen/*.h"
      ss.requires_arc  = true
    end
  
    xy.subspec 'TripleDESModule' do |ss|
      ss.source_files  = "XYLib/Source/Module/TripleDESModule/*.{c,h,m}"
      ss.public_header_files = "XYLib/Source/Module/TripleDESModule/*.h"
      ss.requires_arc  = true
    end
  
    xy.subspec 'WXApplicationModule' do |ss|
      ss.source_files  = "XYLib/Source/Module/WXApplicationModule/*.{c,h,m}"
      ss.public_header_files = "XYLib/Source/Module/WXApplicationModule/*.h"
      ss.requires_arc  = true
    end
  
    xy.subspec 'FileManagerModule' do |ss|
      ss.source_files  = "XYLib/Source/Module/FileManagerModule/*.{c,h,m}"
      ss.public_header_files = "XYLib/Source/Module/FileManagerModule/*.h"
      ss.requires_arc  = true
    end
  end


  s.dependency 'SSZipArchive', '2.2.2'
  s.dependency 'NodeMediaClient', '2.4.5'
  s.dependency 'JPush', '3.2.6'
  s.dependency 'SocketRocket', '0.5.1'
  s.dependency 'JWT', '2.0.0'

end
